package org.jctc.els.modules.biz.service.elsTeamMembers;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.jctc.els.modules.biz.entity.ElsUserProject.ElsUserProject;
import org.jctc.els.modules.biz.entity.elsTeamMembers.ElsTeamMembers;
import org.jctc.els.modules.biz.vo.ElsTeamMembersVO;
import org.springblade.core.mp.base.BaseService;

import java.util.List;

/**
 * @author maxinyu
 * @title: ElsTeamMembersService
 * @projectName evaluationsystem-boot
 * @description:
 * @date 2022/6/2319:09
 */
public interface ElsTeamMembersService extends BaseService<ElsTeamMembers> {
    /**
     * 查询此小组改成员是否已存在
     * @param userId
     * @param teamId
     * @return
     */
    int selectUserAlreadyExists( Long userId,Long teamId);

    IPage<ElsTeamMembersVO> getExpertsList(IPage<ElsTeamMembersVO> page, String teamId);

    void removeList(List<Long> ids);

    boolean updateLeader(String id,Integer canLeader);

    ElsTeamMembers selectUserLeader(String teamId);

    /**
     * 解绑小组成员
     * @param teamId
     * @param userIds
     * @return
     */
    boolean removeTeamMembers(Long teamId,List<Long> userIds);

}
